import React from 'react';
import { render } from 'react-dom';

// let React = require('react')
// let ReactDom = require('react-dom')

// let oLi = React.createElement('li',{},'qqqqq')
// let oUl = React.createElement('ul',{},[oLi])

// let oDiv = React.createElement('div',{id:"box"},['我是子节点',oUl])


let arr = [111, 222, 333, 444];
let oDiv = React.createElement(
    'div',
    { id: 'box' },
    React.createElement(
        'ul',
        null,
        arr.map(item => React.createElement(
            'li',
            null,
            item
        )),
        React.createElement(
            'span',
            null,
            React.createElement('img', { src: './imgs/01.png', alt: '' })
        ),
        React.createElement(
            'span',
            null,
            React.createElement('img', { src: './imgs/02.png', alt: '' })
        ),
        React.createElement(
            'span',
            null,
            React.createElement('img', { src: './imgs/03.png', alt: '' })
        ),
        React.createElement(
            'span',
            null,
            React.createElement('img', { src: './imgs/04.png', alt: '' })
        )
    )
);

render(oDiv, document.getElementById('app'), () => {
    console.log("渲染成功");
});

//console.log(__dirname);
